package com.doublefish.doublefishrobot.ui.video.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.doublefish.doublefishrobot.R;
import com.doublefish.doublefishrobot.ui.video.bean.VideoInfoBean;

import java.util.List;

/**
 * 作者:dugaofeng on 2024/10/28 08:48
 */
public class VideoAdapter extends BaseQuickAdapter<VideoInfoBean, VideoAdapter.VideoHolder> {

    private Context mContext;
    public VideoAdapter(Context context, List<VideoInfoBean> data) {

        super(R.layout.item_video_item, data);
        mContext = context;
    }

    @Override
    protected void convert(VideoAdapter.VideoHolder helper,VideoInfoBean item) {
        helper.nameTv.setText(item.getName());

//        RequestOptions requestOptions = RequestOptions.bitmapTransform(new RoundedCorners(10));
//        Glide.with(mContext).load(item.getImgPath()).placeholder(resourceId).error(resourceId).apply(requestOptions).into(helper.getHeadImageView());
    }

    class VideoHolder extends BaseViewHolder {
//        ImageView iconImageView;
        TextView nameTv;

        public VideoHolder(View view) {
            super(view);

//            iconImageView = view.findViewById(R.id.cover_image);
            nameTv = view.findViewById(R.id.tv_name);
        }
    }
}